import { defineStore } from 'pinia';
import type { Article } from '@/model/Dynamics';

export const useArticleStore = defineStore('article', {
  state: () => ({
    currentArticle: null as Article | null, // 存储当前文章数据
  }),
  actions: {
    setCurrentArticle(article: Article) {
      this.currentArticle = article; // 保存数据
    },
  },
});